from django.contrib import admin
from django.urls import path
from apps.activitys import views
urlpatterns = [
    #GET /gatherings/ 获取活动列表
    path('gatherings/', views.ActivityView.as_view()),
    # GET /gatherings/<int:pk>/ 获取单个活动详情
    path('gatherings/<int:pk>/', views.ActivityDetailView.as_view()),
    #GET gatherings/<int:pk>/join/ 用户报名参加某个活动
    path('gatherings/<int:pk>/join/', views.ApplicationView.as_view()),
    #path('gatherings/<int:pk>/join/', views.ApplicationView.as_view({'post':'create'})),

]
# from rest_framework.routers import DefaultRouter
#
# rounter = DefaultRouter()
#
# rounter.register(r'gatherings/join/',views.ApplicationView,basename='join')
#
# urlpatterns += rounter.urls